<!DOCTYPE html>
<html lang="en"
xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>编辑排班</title>
</head>
<body>
<main id="main">
<form action="#" th:action="@{/plans/{id}(id=${plan.id})}" th:method="post" th:object="${plan}">
  <input type="hidden" id="doctorId" th:field="*{doctorId}" required>
  <span for="doctorSelect">医生姓名:</span>
  <select id="doctorSelect" required onchange="setDoctorId(this)">
    <option value="">请选择医生</option>
    <option th:each="doctor : ${doctorList}" th:value="${doctor.id}" th:text="${doctor.name}"></option>
  </select>
  <label for="num">看诊人数:</label>
  <input type="text" id="num" th:field="*{num}" required />
  <label for="weekday">工作时间:</label>
  <select id="weekday" th:field="*{weekday}" required>
    <option value="">请选择</option>
    <option value="Monday">星期一</option>
    <option value="Tuesday">星期二</option>
    <option value="Wednesday">星期三</option>
    <option value="Thursday">星期四</option>
    <option value="Friday">星期五</option>
    <option value="Saturday">星期六</option>
    <option value="Sunday">星期日</option>
  </select>
  <div class="text-center">
  <button type="submit">更新</button>
  </div>
</form>
</main>
</body>
</html>